/bin/sh^M: bad interpreter:没有那个文件或目录解决

告别SendKeys!用DD驱动级模拟在Windows 10/11上实现真·后台键鼠操作(Python实战) 本文详细介绍了如何使用DD驱动级模拟技术在Windows 10/11上实现真后台键鼠操作,解决传统方法如pyautogui和SendKeys的局限性。通过Python实战案例,展示了驱动级模拟在游戏自动化、RPA等场景中的高效应用,包括环境配置、核心API解析及高级优化技巧。 阅读详情
/bin/sh^M: bad interpreter:没有那个文件或目录解决
 
执行脚本时发现如下错误:
/bin/sh^M: bad interpreter: 没有那个文件或目录
 
错误分析:
因为操作 系统是 windows,我在windows下编辑的脚本,所以有可能有不可见字符。
脚本文件是DOS格式的, 即每一行的行尾以\n\r来标识, 其ASCII码分别是0x0D, 0x0A.
 
可以有很多种办法看这个文件是DOS格式的还是UNIX格式的, 还是MAC格式的
 
解决方法:
vim filename
然后用命令
:set ff? #可以看到 dos或unix的字样. 如果的确是dos格式的。
 
 
然后用
:set ff=unix #把它强制为unix格式的, 然后存盘退出。
再次运行脚本。
 
另外一种解决方法是使用dos2unix命令转一下,即输入: dos2unix 文件名
ptrade量化策略之ST股弱转强,回测年化115% 本策略的核心是精选ST股票,国九条过滤,防止直接暴雷退市,只做ST股票的弱转强 阅读详情

相关推荐

VS2017中调用gdal(C#版)的方法二(含gdal下载地址,配置过程,代码测试,超详细!!)

VS2017中gdal(C#)版的配置与测试 上次记录了直接在VS2017中下载并应用gdal的方法,这次来记录一下网上下载的安装包配置与测试的方法。 一、环境、版本及下载地址 win10,vs2017社区版,gdal2.4.4 还是像之前在Unity中应用gdal一样,最好是下载已经编译好的C#版的gdal,不然自己配置真的很容易出错,我就是这样的,下面提供不同版本的gdal下载地址: 1.GDAL2.4.4(C#版、64位): https://download.youkuaiyun.com/download/che

chengbaola的博客 1365

在linux上运行sh文件提示坏的解释器: 没有那个文件或目录解决

坏的解释器: 没有那个文件或目录解决

God_Odysseus_123的博客 4904

STM32定时器ARR寄存器详解:从‘水桶接水’到精准测速,你的PWM和编码器都靠它

本文深入解析STM32定时器ARR寄存器的核心原理与应用技巧,从PWM波形生成到编码器测速实战。通过水桶模型和硬件本质的比喻,揭示ARR如何作为定时器的'心跳节拍器',并详细探讨其在动态调频、死区时间配置和高精度PWM中的关键作用。特别针对编码器模式下的ARR配置和溢出补偿算法进行优化建议,帮助工程师提升系统性能和实时性。

weixin_33734785的博客 379

/bin/sh^M: 坏的解释器: 没有那个文件或目录

sh执行报错

1993

LVGL仪表盘实战:5分钟用lv_meter打造汽车仪表UI(附完整代码)

本文详细介绍了如何使用LVGL的lv_meter组件在5分钟内构建专业汽车仪表盘UI。从环境配置、刻度定制到指针动画和性能优化,提供完整代码示例和实战技巧,帮助开发者快速实现嵌入式设备上的高效仪表盘设计。

k5l6m的博客 420

【WRFDA实操第一期】服务器中安装 WRFPLUS 和 WRFDA

【WRFDA实操第一期】安装 WRFPLUS 和 WRFDA

WW、forever的博客 2035

/bin/sh^M: bad interpreter: No such file or directory

 linux shell /bin/sh^M: bad interpreter: No such file or directory在Linux中执行.sh脚本,异常/bin/sh^M: bad interpreter: No such file or directory。  分析:这是不同系统编码格式引起的:在windows系统中编辑的.sh文件可能有不可见字符,

北巷东东的专栏 3295

Unity音游开发全指南:模板与免费资源高效构建节奏游戏

**粒子特效** | [Universal VFX](https://assetstore.unity.com/packages/vfx/particles/universal-vfx-159182) | 免费视觉特效 || **UI素材** | [Game UI Pack](https://assetstore.unity.com/packages/2d/gui/game-ui-pack-86908) | 现代风格UI元素 |**音游开发的黄金法则**:完美的节奏游戏是音乐与游戏的和谐统一。

Loving_enjoy的博客 727

/bin/sh^M:解释器错误:没有那个文件或目录

在win下编辑的时候,换行结尾是\n\r , 而在linux下 是\n,所以才会有 多出来的\rsed -i 's/\r$//' configure 删除configure脚本中的\r

大AI时代,人性化的信息更加难得可贵 124

HFSS实战项目——GPS北斗双模微带天线

本文设计了一款方形圆极化微带天线应用于北斗B1和GPSL1频段,满足高增益、低VSWR、适当方向图等要求。设计中心频率为1568MHz,介质板采用厚度h=1.6mm的Arlon AD450(tm)板,相对介电常数为4.5,采用探针馈电。

2401_87464239的博客 1766

qiankun(微前端) - 解决Element组件库部分样式失效,主应用和子应用分别使用element-ui和element-plus,前端微应用qiankun样式无效污染隔离子应用样式影响其他应用

乾坤qiankun,微前端,vue,qiankun主应用使用vue2+elementui子应用使用vue3+element plus样式失效,子应用样式影响其他应用样式问题,qiankun项目与子应用样式混乱问题,彻底搞定样式污染,前端微应用qiankun样式污染,组件样式部分失效怎么办,互相影响,qiankun子应用中使用element-plus样式失效问题,组件库样式污染混乱,子应用样式影响到主应用怎么办,微前端qiankun子应用样式影响其他应用样式,样式冲突,Vue+qiankun框架样式混乱问题的

✅ 精选推荐文章 8874

linux 用notepad++编写shell脚本出现/bin/sh^M: bad interpreter: 没有那个文件或目录l的解决方案

lgw_999的博客 1319

115网页版VR模式终于能用了!电脑直接播放vr视频沉浸感满满 115vr播放 无需vr头盔播放vr视频 在线vr播放器 115网盘360度视频播放方法 115全景视频播放教程

油猴 + 脚本让你网页端直接开启 VR 模式支持 360 视频拖动视角,非常沉浸适合电脑设备直接用无需vr头盔也能轻松畅看vr视频,希望也能帮到你。如果你也被 115 的限制搞烦了,不妨试试这招。

代码简单说 Vue、JAVA、PHP、Node.js 熟练运用,接口、架构、性能全搞定。 5710

./startup.sh: /bin/sh^M: bad interpreter: 没有那个文件或目录 解决办法

把windows下的tomcat7.0.27.zip上传到linux上之后,执行./startup.sh,这个错:     ./startup.sh: /bin/sh^M: bad interpreter: 没有那个文件或目录 解决办法     执行vim startup.sh,输入:set ff?,发现文件格式是dos,果断执行再输入:set ff=unix,然后保存一下。但是光该这个文件是

bruce128的专栏 1万+

Outlook Express 6 (OE6) for Win7/Win8/Win10

英文版 Outlook Express6.0, 兼容Win7/Win10/WinXP,解压就可用。

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

关于shell脚本中报 “/bin/sh^M: bad interpreter: 没有那个文件或目录”的解决方法

如果sh目录存在且脚本无误,最可能是原因是在windows下写的脚本是dos格式的,放在Linux下编码不识别,解决方法是使用dos2unix命令转一下,即输入: dos2unix 文件名

jlds123的专栏 1815

假人有限元模型

假人模型,车辆碰撞假人有限元模型,适合做乘员安全的研究者利用

上一篇: minicom的使用
下一篇: Linux下动态库so的生成与使用
常用技术
博客等级 码龄17年 91粉丝 100原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值