Click here to Skip to main content
15,891,708 members
Everything / Programming Languages / Shell

Shell

shell

Great Reads

by V. Subhash
About odd but critical shell-programming details that get easily forgotten or ignored
by Mr. xieguigang 谢桂纲
How to build my own 3D graphics engine from ZERO step by step
by Kewin Rausch
Moving forward in the future networks evolution
by fd9750
Overview of required tools to cross compile/build/remote debug C/C++ projects on a Windows host ( 10 ) for a Raspberry PI 3B

Latest Articles

by V. Subhash
A simple fix for excessively bright video and low-volume audio
by hemanthk119
Steps to enable VPN client on an OpenWRT router using openvpn and mwan3
by Ben McNamara
Container classes much faster than STL.
by k5054
How to update a bash variable inside a loop when reading from command output

All Articles

Sort by Title

Shell 

5 Apr 2010 by Chris Meech
Just something else to look at. I've had similar issues where the space character being embedded in one of the folder names caused problems. Generally the highlighted files end up being tokenized by a space character and so an embedded one causes one filename to be split across two arguments.
23 Sep 2013 by kaushik4study
HiI found this question somewhere on internet now facing same problem. With little change i already have modfied question below.Question:I want to access a file on remote machine(10.10.20.30), but i couldnt understand how to login to that machine in my program. Is there any simple win...
21 Sep 2013 by H.Brydon
I don't know the answer specifically but in general terms, you need to meet the security criteria for the file open method. A few things to consider:(1) Look at the characteristics of the file share, the file in question and the directory/directories to get to it. If any of these deny access...
18 Jul 2021 by wifinut
I'm trying to add a speed test to my BASH script. I know you can install speedtest-cli on the host, but this is not an option. I'm looking for options perhaps using the CURL command. What I have tried: I tried using a CURL command to obtain the...
18 Jul 2021 by Daniel Pfeffer
Working backwards from the numbers that you give, we get 1 block = 100Mb / 22355 = 4473 bits. This looks close to a 4 Kb (i.e. 512 byte) block size. Adding various header and framing bits make the correspondence even better. I expect that you...
16 Oct 2021 by wifinut
I need to compare today's date in Epoch time to another Epoch date stored in a variable. I can store today's epoch in a variable with no problem. I run into trouble when I try to store a derived $cert_experation_epoch. This is most likely a...
16 Oct 2021 by Peter_in_2780
cert_expiration_epoch=$(date +%s -d "$cert_expiration") You really should start using the basic tools available. date --help man date man bash Also as someone else already told you, it's much better to use $(command) rather than `command`
27 May 2021 by Oscar-Tark
In this article, we will be looking at a more advanced version of a buffer overflow attack.
4 Oct 2012 by Anil Dalsaniya
About Android adb shellWhen i am inserting the data that will insert successfully also they are displyed in file explorer>data>data>package>databaseBut when i use adb shell that time display no such table available:i don't know what happenplease help me...
9 Oct 2012 by Mike DiGiovanni
It sounds like you want to access your apps data directory from adb shell. It's nt normally accessible since your files are generally not world readable, however you can run the adb shell as your pgram's user if your app is set as debuggableAt the ADB shell, just type:run-as...
4 Oct 2014 by Pavel Durov
This article will explain how to explore Android internal data from Eclipse DDMS perspective using adb and Linux commands.
17 Jan 2011 by BoSkjoett
How to create and delete shortcut files in Windows Startup Folder using C#.
11 Jan 2013 by Sandeep Mewara
Please avoid reposting: Can cellphone be detected by WiFi router in GSM Cellular mode?[^]Follow at one place. If needed, use 'Improve Question' to edit/update your question. I am removing this copy of question.
9 Jan 2013 by Chattrawit Jayz Cpe
Anyone can suggest Femtocell SDK in below condition:Purpose: My Femtocell want to detect Cellphone Identification(SIM IMSI, Serial, Phone No or any which Femtocell can identify) in Femtocell coverage areaConditions- OS: Windows(CE, XP or any), Linux or UNIX- Development Language...
30 Jan 2010 by Clement Tan
function check_title_author #function to input title / author{ while [ "$Title" = "" ] do echo "Title : \c " read Title done while [ "$Author" = "" ] do echo "Author : \c " read Author done}
30 Jan 2010 by Clement Tan
Forget to indicate, its shell programming using functions
30 Jan 2010 by Richard MacCutchan
What shell is this, and where do you get the syntax error? Please try to be specific about your problem.
9 Nov 2018 by YasIkeda
Tutorial about how to add authentication functionalities to your existing ASP.NET Core project using Microsoft.AspNetCore.Identity.UI package
30 Jul 2019 by Don Hoang
This post describes implementing ASP.NET Gridview using Bootstrap 4.
19 Nov 2011 by User008
Drag 'n Drop asynchronous files from an external server or device
20 Apr 2021 by Padala Vamsi ujpNQUXGRi
I made a c program which takes two standard inputs automatically and one manually. #include int main() { int i, j; scanf("%d %d", &i, &j); printf("Automatically entered %d %d\n", i, j); int k; ...
20 Apr 2021 by k5054
When you use a Here Document, the shell effectively does echo -e "1\n2\n" > /tmp/tempname ./test
20 Apr 2021 by Padala Vamsi ujpNQUXGRi
I found solution we can simply use Process Substitution. cat
8 Nov 2016 by Afzaal Ahmad Zeeshan
In this post, I will show you how to create a small script to automate the deployment of your ASP.NET Core applications to Microsoft Azure using local git deployment.
7 May 2023 by as7951
Experts, Need your support for this awk script. we have only one input file, all these column 1 and column 2 are in same file and have to do lookup for values in one file(column1 and column2) but output we need in another file Need to grep row whose string contains 9K in column 1 and then grep...
7 May 2023 by Member 10601191
/^9K/ { kees[$0]; next; } { for ( key in kees ) { # # is it part of the key ... # if ( match( key, $1) ) { if(...
26 Jul 2022 by Goutham GSK
Hello Everyone, I am trying to read a file which contains numbers(Floats and integers) line by line, I am able to read the line correctly and it works fine, but when I try to compare it with a different number I am failing at that point ...
26 Jul 2022 by k5054
You can use normal comparison operators inside a bash [[ ]] expresion. Try if [[ $line > 30 ]]; then ... fi
25 Aug 2018 by Kewin Rausch
Introduction to protocols to manage Key Exchange in secure channels communication
21 Apr 2022 by Matt Pogue
Scripting is a crucial skill for any admin to learn. This post walks through the process to develop a batch file download script in Python, demonstrating how to use the interactive Python shell to troubleshoot while writing code.
1 Feb 2017 by Mr. xieguigang 谢桂纲
How to build my own 3D graphics engine from ZERO step by step
19 Oct 2016 by Member 11683251
Backstory: I got a huge wall of sql code from a program which I want to use to dump data in excel. Executing this code from VBA produces a lot of errors and the chunk of code is to big and jumbled to go through.Running the query in C# works fine so I've written a program which grabs the data...
19 Oct 2016 by #realJSOP
You also need to encapsulate a field with double quotes if the field itself contains one or more double quotes.
19 Oct 2016 by Bernhard Hiller
The working directory for execution of the macro may differ from the folder of the file. With a full path like "c:\\temp\\excelDump.csv", you are on the safer side.
6 Apr 2010 by Guy Tal
I need to run the cmd shell minimized from C# code. How can i do that?The problem is when I try to run a command using smd (for example mounting of a drive) it opens console window maximuzed and it hides my application Form. It doesn't look good, so I want to find a way to run the cmd...
4 Apr 2010 by OriginalGriff
TrymountingPro...
5 Apr 2010 by Guy Tal
It works!thanks a lot! .
27 Mar 2013 by metastruct
When WebClient, HttpRequest, and all else fail, BITSadmin solves your download woes
23 Jan 2013 by berilium
Hello,I want to write an application able to find text in files and report result back in a graphical way (to show files relationship).I would like to hear some recommendations on what tech I can use to achieve this. My first attempt was to write a Visual Studio Isolated Shell because I...
23 Jan 2013 by Sergey Alexandrovich Kryukov
It's easy. You need to do it by yourself.You need to use: System.IO.Directory.GetFiles, http://msdn.microsoft.com/en-us/library/system.io.directory.getfiles.aspx[^].There is one unpleasant problem with this API. To take it into account, please see this discussion: Directory.Get.Files...
4 May 2011 by Lighter Zhang
I implemented an IShellBrowser to host an IShellView object. And I set the FWF_DESKTOP flag when I call IShellView::CreateViewWindow. After IShellView::UIActivate, the view window its created cannot accept user drop files on it, but can drag to other explorer Window. I tried to obtain an...
26 May 2011 by Ivan Mazepov
Thing is, somehow, a drop target is not registered for the shell's ListView if FWF_DESKTOP is set.So first, implement IDropTarget in a class. Then you should find the underlying ListView and call RegisterDrapDrop using the ListView's HWND and an instance of your class.It's also nice to look...
10 Mar 2010 by taras_b
The task seems to be a simple one but I cannot find a simple way to accomplish it. I want to change application icon and title on Win7 taskbar without changing the Form.Text and Form.Icon.Painiting custom border seems to be a pain (particularly as it may interfere with the...
10 Mar 2010 by Alaric Dailey
For consistency, the icon in your taskbar is the icon on your form (so it makes sense to the user). If you want to do this, the only way I can think to do is some "slight of hand". Change the "show in taskbar" property to falseCreate a new form and force it to stay minimizedchange...
2 May 2011 by Ángel Manuel García Carmona
Hello, i want to know how my app has started, for example, if it started by a command as "program.exe /p" and indicate in the code what should do the app in diverse cases (for example when it started by /open command, /edit,...).I need a solutionThanks in advanceRegards
2 May 2011 by Dave Kreskowiak
There's no way to tell how your app was launched. There is no pointer to anything that says how are under what circumstances your app was launched.
2 May 2011 by dan!sh
Are you looking for command line arguments[^]? It seems so to me from your comment to Dave.
2 May 2011 by Dave Kreskowiak
You're kidding me, right? All you do is call the appropriate method in your code if you find an instance of the switch in the command line arguments. How hard is it to check for the existance of a string in a collection of them?public void Main(){ List argsCollection = new...
9 Jan 2014 by MikeBah
I took a program that someone wrote for a terminal-like shell interface for UNIX. However, I would like to change this so it can emulate a command prompt, not a terminal.The program compiles, but if I try, for example, running the simple command of "dir" within the program then it panics and...
9 Jan 2014 by Richard MacCutchan
Commands such as "dir" are internal to the command shell, and not freestanding programs. So you have to send them to a command shell process, you cannot invoke them in the way you have in your code. For this simple program you could just try sending every command to the shell in that way. The...
19 Oct 2015 by marcus obrien
From the command line, you can control your iOS device using the libimobile tools, these are some common commands.
15 May 2018 by Member 13828145
Hello, I'm trying to realize a configurable COM server reading the configuration settings from an xml. The problem is that as I have seen on the different tutorials the association of the COM server with a specific file extension is performed through the COMServerAssociation attribute which...
16 Jul 2023 by hemanthk119
Steps to enable VPN client on an OpenWRT router using openvpn and mwan3
23 Apr 2012 by nagiub2007
i installed vs2008 then vs 2010 in same machinewhen i start vs2008 open vs shell that hasn't any project type c# or vbhow can i open vs2008 in professional version that i installed
29 Sep 2013 by Strider87
Hello All,I need to take user input value into the system and convert it to a time format.as an example :- if user input value as 3, i need to convert this value into 3 hours.Is this possible in shell scripting.Thank you,
18 Jan 2019 by Member 14121946
@ECHO OFF if not "%1"=="STDOUT_TO_FILE" %0 STDOUT_TO_FILE %* >>local_repo_log.txt 2>&1 shift /1 REM Script to migrate tfs to git repo. REM Reads tfs repo url from control.txt and pushes to git @echo Migration Started: %date% %time% REM read from control file FOR /F "usebackq tokens=1-10...
2 May 2013 by joedoeuse
how would one go about creating a struct for a file/directory tree. The c program gets a txt file input with shell scripts of the paths of each txt file. for examplea\a1.txta\m\m1.txthow would you create a struct for this, where the c program will parse through this txt file
2 May 2013 by Richard MacCutchan
I wouldn't, I'd use the standard one[^].
20 Apr 2020 by phil.o
Here are a few examples: Bash Infinite Loop Examples - nixCraft[^]
21 May 2021 by Jarek Szczegielniak
In this article we use Visual Studio Code to edit and debug our increasingly complex code running inside a Docker container.
25 May 2021 by Jarek Szczegielniak
In this article, we publish our NLP API service to Azure using Azure Container Instances.
19 Jan 2014 by Andrey Chaschev
A Bear deployment example of a Petclinic Grails demo from GitHub.com
5 Dec 2010 by LordXandor
I am attempting to create my own shell and am now working on the system tray. I would like to know if there is a way to determine the system tray icon information (ie: If there is an icon, right and left click actions/menus, etc) for open applications or how I can catch the creation/deletion...
5 Dec 2010 by LordXandor
For future reference to other developers wanting to achieve the same or similar effect: After lots of research and, most of all, help from a fellow developer I have found the answer to this. If a class is created with a custom class name of "Shell_TrayWnd" this class will automatically receive...
31 Mar 2011 by Mohamed Meshref
So were you able to pull this?
18 Apr 2010 by Eureka_jim
I need to start another executable from within a VB program . After this program exits, my VB program will continue.
18 Apr 2010 by Tarakeshwar Reddy
Look at this article[^]. I am not sure if you can do it differently.
18 Apr 2010 by kornakar
Dim wshShellSet wshShell = CreateObject("WScript.Shell")wshShell.Run "notepad.exe", 1, True 'Waits here until the program is closedSet wshShell = NothingBefore you can use this, you must add a reference to "Microsoft Scripting Runtime" to your project.
20 Jul 2010 by Eddy Vluggen
Building (almost) a RAM-Disk using the Dokan library and C#
12 Sep 2013 by Member 10247794
Hi, Right new, I want to make a application about drop and drag icons.The major function is same as the "WINZIP" or "Recycle Bin".I can move and add one or more items icon to my application icon and then link to other actions, such as copying or deleting the selected...
12 Sep 2013 by Ron Beyer
This is a default behavior in windows. It will simply start your program with the first parameter of the command line being the path to the file that was dragged on top of the icon.See this article[^] about parsing command line parameters. Once you have the file name (or names if multiple...
22 Oct 2013 by Bashar Tahir
Easily zip / unzip files using Windows Shell32
25 May 2020 by Jonathan Nethercott
Automated Raspberry Pi Setup for .NET Core development and remote debugging using Visual Studio Code
25 Mar 2018 by Dave Kerr
In this article, I'll show you how you can use the shell as an efficient tool to compliment how you use the clipboard.
19 Dec 2017 by Dave Kerr
In this article, I'll show you how to quickly get help when working with tools in the shell, without disrupting your flow!
18 May 2012 by NaveenSoftwares
Hi AllI tried to exceute a third part application through a batch file. The batch cfiles has contents like below"C:\Testing\Engine.exe" aWhere "a" is a parameter to be paased.This batch is called by a VB application through Shell command.While executing this batch file through...
18 May 2012 by OriginalGriff
The trouble is, that it could be almost anything.The most likely is that the systems on which it is failing are either Vista or Win 7 and accessing a folder / file to which you do not have the necessary permissions.
25 Sep 2012 by sunder.tinwar
Hi Guys,I am writing a module which will be executing any kind of shell commands related to active directory and other shell commands on a particular domain controllerSome of command are working but some of commands are not working properly. Here is the codepublic static void...
9 Nov 2012 by ohsorry
Sorry, my English sucks, I hope I can express clearly.i want to add a bar to the windows explorer,after a long time searching,i'v made a bar using BandObjectsLib(a C# library) and added it in to the Explorer window.but i have to open it through "Menu-View-Explorer bar",and the bar also came out...
9 Nov 2012 by vivektiwari97701
Extending Explorer with Band Objects using .NET and Windows Forms[^]
7 Apr 2012 by Mikhail-T
How to write a Powershell script, which will first export all your projects (excluding source control data), then pack them with 7-Zip.
20 Sep 2011 by matarsak
I wrote a bash script to extract a few Items like the IP addresses that makes the most number of connection attempts, now I want to limit all of this within a time range , lets say the last 5 days/hours.Example of what I wrote :-G: Which IP address makes the most number of connection...
22 Apr 2023 by Ben McNamara
Container classes much faster than STL.
5 Nov 2023 by V. Subhash
A simple fix for excessively bright video and low-volume audio
21 Jan 2010 by JimBob SquarePants
Hi all, I'm playing about with the WindowsAPICodePack and i've got a few queries regarding how Windows deals with file types.As part of the API you have the ability to register filetype associations with your application using RegisterFileAssociations(string progId, ...
21 Jan 2010 by Rick Shaub
File associations do not apply to folders. However, there is a concept of Special and Custom folders in Windows. See the links below for more information:http://en.wikipedia.org/wiki/Special_Folders[^]http://msdn.microsoft.com/en-us/library/s2esdf4x(VS.80).aspx[^]
14 Nov 2010 by infinateone
A file manager app with Clipboard interaction and drag and drop support.
9 Jan 2017 by Michael Haephrati
This article explains how the Skype account details are stored, how to fetch this information and in general, how to interpret XML files using Rapid XML library.
3 May 2010 by Riaan Lehmkuhl
Create a new text file called shortname.vbs:Open in Notepad and paste the following code in it:set fso = CreateObject("Scripting.FileSystemObject") strLongName = Wscript.Arguments(0)strShortName = "Invalid File/Folder - (" & strLongName & ")"Set fsoFile = NothingOn Error Resume...
5 Sep 2018 by Thaana Paana
I want to return the windows right click items that is in HKEY_CLASSES_ROOT in order. By order like when you click a folder or a certain extension you get different menus and they are in separate places in HKEY_CLASSES_ROOT, how does windows know to return them in order on right click when they...
5 Sep 2018 by Richard MacCutchan
If you do not know anything about this subject then I would suggest starting with a simpler project. You can find lots of useful tutorials in the https://www.codeproject.com/KB/shell/[^] section, or by using Google.
5 Sep 2018 by BillW33
There is a good example of how to loop through all the keys for a registry here: https://stackoverflow.com/questions/1458653/iterate-through-registry-entries Read about the Registry Key Class here: https://docs.microsoft.com/en-us/dotnet/api/microsoft.win32.registrykey?view=netframework-4.7.2 ...
13 Mar 2012 by Punit Belani
Hi All,Code:int height = 0;int width = 0;Shell32.Shell Sh = new Shell32.Shell();Shell32.FolderItem FI;Shell32.Folder F;F = Sh.NameSpace(System.IO.Path.GetDirectoryName(Server.MapPath("~/") + MovingImages + "caesarstonelongeng03142012063807596.mp4"));FI =...
13 Mar 2012 by Abhinav S
Use the GetDetailsEx method instead of GetDetailsOf.
24 Feb 2014 by estie chen
Check your server, may be you have to install the Media Foundation feature(windows server 2012: through Server Manager -> add Roles and features)
15 Mar 2015 by Member 10031219
Any updates about this issue ? im facing the same problem